#:kivy 1.6.0
#:import DisableableButton ui.disableable_button.DisableableButton
#:import FittableLabel ui.fittable_widgets.FittableLabel
#:import FittableButton ui.fittable_widgets.FittableButton
#:import Phase model.gamestate.Phase
#:import WordGuessResult model.gamestate.WordGuessResult
#:import ConfirmationButton ui.confirmation_button.ConfirmationButton
#:import win kivy.core.window

<ResultsOfOnePair>:
    okbutton: ok
    end_button: end_button
    word_list: word_list
    orientation: 'vertical'
    BoxLayout:
        size_hint_y: None
        height: root.height*0.2
        orientation: 'horizontal'

        ConfirmationButton:
            id: end_button
            text_normal: _('Replay round')
            on_confirm: root.replay_round()

        FittableLabel:
            size_hint_x: 1
            halign: 'right'
            text: 'Слов в шляпе:  {}'.format(root.words_left)

    ScrollView:
        do_scroll_x: False
        size_hint_x: 1
        GridLayout:
            id: word_list
            cols: 1
            size_hint_y: None
            size_hint_x: 1

    DisableableButton:
        color_name: 'green'
        size_hint_y: 0.5
        id: ok
        text: root.button_text[root.next_phase]
        on_release: root.to_next()

<WordLabel>:
    word_btn:word_btn
    id: word_lbl
    FittableButton:
        id: word_btn
        background_color: 0,0,0,1
        size_hint: (1, None)
        height: '35sp'
        color_name: word_lbl.colors[word_lbl.guess_result.result]
        text: word_lbl.guess_result.word.text
        on_release: word_lbl.swap_result()
    FittableButton:
        background_color: 0,0,0,1
        size_hint: (0.1, None)
        height: '35sp'
        text: '...'
        on_release: word_lbl.swap_result()

<HelpButton>:
    text: _('Look up in a dictionary')
    on_release: self.get_help()

<SendReportButton>:
    text: _('Report bad word')
    on_release: self.send_report()

<AddToFavoriteButton>:
    text: _('Add to favorites')
    on_release: self.add()
